# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnjb
pkgver=2.2.7
pkgrel=6
pkgdesc="A software library for talking to the Creative Nomad Jukeboxes and Dell DJs"
url="https://libnjb.sourceforge.net/"
arch="all"
license="BSD-3-Clause"
depends_dev="libusb-compat-dev"
makedepends="$depends_dev linux-headers eudev-dev zlib-dev ncurses-dev"
subpackages="$pkgname-dev $pkgname-examples"
source="https://download.sourceforge.net/libnjb/libnjb-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

examples() {
	pkgdesc="Example programs for libnjb"
	amove usr/bin
}

sha512sums="
d217beb772024ec122739327dae9f1e991ace4c3dfe79a4960d1d7421c3d663f924304331025a1790ea7b697ac84d8926f3ab507c6d919e781e90ca82ef6fd06  libnjb-2.2.7.tar.gz
"
